<%= form_for @post do |f| %>

<% if @post.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@post.errors.count, "error") %> prohibited this category from being saved:</h2>

      <ul>
      <% @post.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
  


<div class="form">
  <%= f.label :title, "Naslov" %> <br />
  <%= f.text_field :title, :class => [:big,:title] %>
</div>

<div class="form">
  <%= f.label :slug, "URL naslov (slug)" %><br />
  <%= f.text_field :slug, :class => [:big, :slug] %>
</div>

<div class="form">
  <%= f.label :category, "Kategorija" %><br>
  <%= collection_select( :post, :category_id, @categories, :id, :name) %>
</div>    

<div class="form">
  <%= f.label :content, "Sadržaj" %> <br />
  <%= f.text_area :content, :class => [:big,'bb-code'] %>
</div>
 

  <%= f.submit "Spremi" %>
  
<% end %>